﻿<%-- 
    Copyright (C) Binod Nepal, Planet Earth Solutions Pvt. Ltd., Kathmandu.
	Released under the terms of the GNU General Public License, GPL, 
	as published by the Free Software Foundation, either version 3 
	of the License, or (at your option) any later version.
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
    See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
--%>

<%@ Page Title="Post an Ad" Language="C#" MasterPageFile="~/Classifieds/Main.Master"
    AutoEventWireup="true" CodeBehind="AddNewAd.aspx.cs" Inherits="MixNP.Web.Classifieds.My.AddNewAd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="StyleSheetContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ScriptsContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="BodyContentPlaceHolder" runat="server">
    <h1>
        Post an Ad
    </h1>
    <hr class="hr" />
    <input type="button" onclick="location.href='/dashboard.mix';" value="Dashboard" />
    <h2>
        Select a Category</h2>
    <asp:DropDownList ID="CategoryDropDownList" runat="server" DataTextField="CategoryName"
        DataValueField="CategoryId" DataSourceID="SqlDataSource1" CssClass="dropdownlist wide">
    </asp:DropDownList>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:PESConnectionString %>"
        SelectCommand="SELECT
	                                        CategoryId,
	                                        CategoryName + '&nbsp;&nbsp;&nbsp;&nbsp;&lt;--' + dbo.GetParentCategoryName(CategoryId) + '' AS CategoryName 
                                        FROM dbo.Categories
                                        WHERE ParentCategoryId IS NOT NULL
                                        ORDER BY ParentCategoryId;"></asp:SqlDataSource>
    <br />
    <asp:Button ID="StartButton" runat="server" Text="Let's Start" CssClass="button"
        OnClick="StartButton_Click" />
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="ScriptsContentPlaceHolderBottom"
    runat="server">
</asp:Content>
